.class Lcom/glympse/android/glympse/ViewSendGlympse$RecipientUI;
.super Ljava/lang/Object;
.source "ViewSendGlympse.java"

# interfaces
.implements Landroid/view/View$OnClickListener;


# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
    value = Lcom/glympse/android/glympse/ViewSendGlympse;
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x0
    name = "RecipientUI"
.end annotation


# instance fields
.field private m_oLayoutRecipient:Landroid/widget/RelativeLayout;

.field private m_oRecipient:Lcom/glympse/platform/common/Recipient;

.field final synthetic this$0:Lcom/glympse/android/glympse/ViewSendGlympse;


# direct methods
.method public constructor <init>(Lcom/glympse/android/glympse/ViewSendGlympse;Lcom/glympse/platform/common/Recipient;)V
    .locals 2
    .parameter
    .parameter "oRecipient"

    .prologue
    .line 1012
    iput-object p1, p0, Lcom/glympse/android/glympse/ViewSendGlympse$RecipientUI;->this$0:Lcom/glympse/android/glympse/ViewSendGlympse;

    .line 1004
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    .line 1006
    iput-object p2, p0, Lcom/glympse/android/glympse/ViewSendGlympse$RecipientUI;->m_oRecipient:Lcom/glympse/platform/common/Recipient;

    .line 1009
    invoke-static {p1}, Lcom/glympse/android/glympse/ViewSendGlympse;->access$9(Lcom/glympse/android/glympse/ViewSendGlympse;)Lcom/glympse/platform/common/Ticket;

    move-result-object v0

    iget-object v0, v0, Lcom/glympse/platform/common/Ticket;->m_listRecipients:Lcom/glympse/platform/GVector$Recipients;

    iget-object v1, p0, Lcom/glympse/android/glympse/ViewSendGlympse$RecipientUI;->m_oRecipient:Lcom/glympse/platform/common/Recipient;

    invoke-virtual {v0, v1}, Lcom/glympse/platform/GVector$Recipients;->add(Ljava/lang/Object;)Z

    .line 1011
    const/4 v0, 0x0

    invoke-direct {p0, v0}, Lcom/glympse/android/glympse/ViewSendGlympse$RecipientUI;->Create(Z)V

    return-void
.end method

.method public constructor <init>(Lcom/glympse/android/glympse/ViewSendGlympse;Lcom/glympse/platform/common/Recipient;Z)V
    .locals 0
    .parameter
    .parameter "oRecipient"
    .parameter "fNoDelete"

    .prologue
    .line 1020
    iput-object p1, p0, Lcom/glympse/android/glympse/ViewSendGlympse$RecipientUI;->this$0:Lcom/glympse/android/glympse/ViewSendGlympse;

    .line 1015
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    .line 1017
    iput-object p2, p0, Lcom/glympse/android/glympse/ViewSendGlympse$RecipientUI;->m_oRecipient:Lcom/glympse/platform/common/Recipient;

    .line 1019
    invoke-direct {p0, p3}, Lcom/glympse/android/glympse/ViewSendGlympse$RecipientUI;->Create(Z)V

    return-void
.end method

.method private Create(Z)V
    .locals 8
    .parameter "fNoDelete"

    .prologue
    const/4 v7, 0x0

    const/4 v6, 0x0

    .line 1026
    iget-object v2, p0, Lcom/glympse/android/glympse/ViewSendGlympse$RecipientUI;->this$0:Lcom/glympse/android/glympse/ViewSendGlympse;

    invoke-virtual {v2}, Lcom/glympse/android/glympse/ViewSendGlympse;->getContext()Landroid/content/Context;

    move-result-object v2

    invoke-static {v2}, Landroid/view/LayoutInflater;->from(Landroid/content/Context;)Landroid/view/LayoutInflater;

    move-result-object v2

    const v3, 0x7f03001f

    iget-object v4, p0, Lcom/glympse/android/glympse/ViewSendGlympse$RecipientUI;->this$0:Lcom/glympse/android/glympse/ViewSendGlympse;

    invoke-static {v4}, Lcom/glympse/android/glympse/ViewSendGlympse;->access$10(Lcom/glympse/android/glympse/ViewSendGlympse;)Landroid/widget/LinearLayout;

    move-result-object v4

    invoke-virtual {v2, v3, v4, v7}, Landroid/view/LayoutInflater;->inflate(ILandroid/view/ViewGroup;Z)Landroid/view/View;

    move-result-object v2

    check-cast v2, Landroid/widget/RelativeLayout;

    iput-object v2, p0, Lcom/glympse/android/glympse/ViewSendGlympse$RecipientUI;->m_oLayoutRecipient:Landroid/widget/RelativeLayout;

    .line 1027
    iget-object v2, p0, Lcom/glympse/android/glympse/ViewSendGlympse$RecipientUI;->this$0:Lcom/glympse/android/glympse/ViewSendGlympse;

    invoke-static {v2}, Lcom/glympse/android/glympse/ViewSendGlympse;->access$10(Lcom/glympse/android/glympse/ViewSendGlympse;)Landroid/widget/LinearLayout;

    move-result-object v2

    iget-object v3, p0, Lcom/glympse/android/glympse/ViewSendGlympse$RecipientUI;->m_oLayoutRecipient:Landroid/widget/RelativeLayout;

    iget-object v4, p0, Lcom/glympse/android/glympse/ViewSendGlympse$RecipientUI;->this$0:Lcom/glympse/android/glympse/ViewSendGlympse;

    invoke-static {v4}, Lcom/glympse/android/glympse/ViewSendGlympse;->access$10(Lcom/glympse/android/glympse/ViewSendGlympse;)Landroid/widget/LinearLayout;

    move-result-object v4

    iget-object v5, p0, Lcom/glympse/android/glympse/ViewSendGlympse$RecipientUI;->this$0:Lcom/glympse/android/glympse/ViewSendGlympse;

    invoke-static {v5}, Lcom/glympse/android/glympse/ViewSendGlympse;->access$11(Lcom/glympse/android/glympse/ViewSendGlympse;)Landroid/widget/RelativeLayout;

    move-result-object v5

    invoke-virtual {v4, v5}, Landroid/widget/LinearLayout;->indexOfChild(Landroid/view/View;)I

    move-result v4

    invoke-virtual {v2, v3, v4}, Landroid/widget/LinearLayout;->addView(Landroid/view/View;I)V

    .line 1030
    iget-object v2, p0, Lcom/glympse/android/glympse/ViewSendGlympse$RecipientUI;->m_oLayoutRecipient:Landroid/widget/RelativeLayout;

    const v3, 0x7f0c006f

    invoke-virtual {v2, v3}, Landroid/widget/RelativeLayout;->findViewById(I)Landroid/view/View;

    move-result-object v1

    check-cast v1, Landroid/widget/TextView;

    .line 1031
    .local v1, oEditRecipient:Landroid/widget/TextView;
    invoke-virtual {v1, v7}, Landroid/widget/TextView;->setFocusable(Z)V

    .line 1032
    iget-object v2, p0, Lcom/glympse/android/glympse/ViewSendGlympse$RecipientUI;->m_oRecipient:Lcom/glympse/platform/common/Recipient;

    invoke-virtual {v2}, Lcom/glympse/platform/common/Recipient;->GetDisplayText()Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v1, v2}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    .line 1033
    const/4 v2, 0x7

    invoke-virtual {v1, v2}, Landroid/widget/TextView;->setCompoundDrawablePadding(I)V

    .line 1034
    iget-object v2, p0, Lcom/glympse/android/glympse/ViewSendGlympse$RecipientUI;->this$0:Lcom/glympse/android/glympse/ViewSendGlympse;

    invoke-virtual {v2}, Lcom/glympse/android/glympse/ViewSendGlympse;->getContext()Landroid/content/Context;

    move-result-object v2

    invoke-virtual {v2}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;

    move-result-object v2

    iget-object v3, p0, Lcom/glympse/android/glympse/ViewSendGlympse$RecipientUI;->m_oRecipient:Lcom/glympse/platform/common/Recipient;

    invoke-static {v3}, Lcom/glympse/android/glympse/Glympse;->GetRecipientImage(Lcom/glympse/platform/common/Recipient;)I

    move-result v3

    invoke-virtual {v2, v3}, Landroid/content/res/Resources;->getDrawable(I)Landroid/graphics/drawable/Drawable;

    move-result-object v2

    invoke-virtual {v1, v2, v6, v6, v6}, Landroid/widget/TextView;->setCompoundDrawablesWithIntrinsicBounds(Landroid/graphics/drawable/Drawable;Landroid/graphics/drawable/Drawable;Landroid/graphics/drawable/Drawable;Landroid/graphics/drawable/Drawable;)V

    .line 1037
    iget-object v2, p0, Lcom/glympse/android/glympse/ViewSendGlympse$RecipientUI;->m_oLayoutRecipient:Landroid/widget/RelativeLayout;

    const v3, 0x7f0c0070

    invoke-virtual {v2, v3}, Landroid/widget/RelativeLayout;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/ImageButton;

    .line 1039
    .local v0, buttonDelete:Landroid/widget/ImageButton;
    if-eqz p1, :cond_0

    .line 1041
    const/16 v2, 0x8

    invoke-virtual {v0, v2}, Landroid/widget/ImageButton;->setVisibility(I)V

    .line 1049
    :goto_0
    iget-object v2, p0, Lcom/glympse/android/glympse/ViewSendGlympse$RecipientUI;->this$0:Lcom/glympse/android/glympse/ViewSendGlympse;

    invoke-virtual {v2}, Lcom/glympse/android/glympse/ViewSendGlympse;->UpdateSendButton()V

    .line 1050
    return-void

    .line 1045
    :cond_0
    invoke-virtual {v0, p0}, Landroid/widget/ImageButton;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    goto :goto_0
.end method


# virtual methods
.method public onClick(Landroid/view/View;)V
    .locals 2
    .parameter "oView"

    .prologue
    .line 1056
    iget-object v0, p0, Lcom/glympse/android/glympse/ViewSendGlympse$RecipientUI;->this$0:Lcom/glympse/android/glympse/ViewSendGlympse;

    invoke-static {v0}, Lcom/glympse/android/glympse/ViewSendGlympse;->access$9(Lcom/glympse/android/glympse/ViewSendGlympse;)Lcom/glympse/platform/common/Ticket;

    move-result-object v0

    iget-object v0, v0, Lcom/glympse/platform/common/Ticket;->m_listRecipients:Lcom/glympse/platform/GVector$Recipients;

    iget-object v1, p0, Lcom/glympse/android/glympse/ViewSendGlympse$RecipientUI;->m_oRecipient:Lcom/glympse/platform/common/Recipient;

    invoke-virtual {v0, v1}, Lcom/glympse/platform/GVector$Recipients;->remove(Ljava/lang/Object;)Z

    .line 1059
    iget-object v0, p0, Lcom/glympse/android/glympse/ViewSendGlympse$RecipientUI;->this$0:Lcom/glympse/android/glympse/ViewSendGlympse;

    invoke-static {v0}, Lcom/glympse/android/glympse/ViewSendGlympse;->access$10(Lcom/glympse/android/glympse/ViewSendGlympse;)Landroid/widget/LinearLayout;

    move-result-object v0

    iget-object v1, p0, Lcom/glympse/android/glympse/ViewSendGlympse$RecipientUI;->m_oLayoutRecipient:Landroid/widget/RelativeLayout;

    invoke-virtual {v0, v1}, Landroid/widget/LinearLayout;->removeView(Landroid/view/View;)V

    .line 1060
    iget-object v0, p0, Lcom/glympse/android/glympse/ViewSendGlympse$RecipientUI;->this$0:Lcom/glympse/android/glympse/ViewSendGlympse;

    invoke-static {v0}, Lcom/glympse/android/glympse/ViewSendGlympse;->access$12(Lcom/glympse/android/glympse/ViewSendGlympse;)Landroid/widget/ScrollView;

    move-result-object v0

    invoke-virtual {v0}, Landroid/widget/ScrollView;->refreshDrawableState()V

    .line 1064
    iget-object v0, p0, Lcom/glympse/android/glympse/ViewSendGlympse$RecipientUI;->this$0:Lcom/glympse/android/glympse/ViewSendGlympse;

    invoke-virtual {v0}, Lcom/glympse/android/glympse/ViewSendGlympse;->UpdateMessageColor()V

    .line 1067
    iget-object v0, p0, Lcom/glympse/android/glympse/ViewSendGlympse$RecipientUI;->this$0:Lcom/glympse/android/glympse/ViewSendGlympse;

    invoke-virtual {v0}, Lcom/glympse/android/glympse/ViewSendGlympse;->UpdateSendButton()V

    .line 1068
    return-void
.end method

.method public toString()Ljava/lang/String;
    .locals 1

    .prologue
    .line 1073
    iget-object v0, p0, Lcom/glympse/android/glympse/ViewSendGlympse$RecipientUI;->m_oRecipient:Lcom/glympse/platform/common/Recipient;

    iget-object v0, v0, Lcom/glympse/platform/common/Recipient;->m_strTo:Ljava/lang/String;

    return-object v0
.end method
